using System;

// 定义员工类
class Employee
{
    // 成员变量
    private int employeeId;      // 员工ID
    private string name;         // 姓名
    private int age;             // 年龄
    private string department;   // 部门
    private string position;     // 职位
    private double salary;       // 薪资
    
    // 构造函数（无参）
    public Employee() {}
    
    // 构造函数（带参）
    public Employee(int employeeId, string name, int age, string department, string position, double salary)
    {
        this.employeeId = employeeId;
        this.name = name;
        this.age = age;
        this.department = department;
        this.position = position;
        this.salary = salary;
    }
    
    // 属性访问器（getXxx/setXxx）
    public int EmployeeId
    {
        get { return employeeId; }
        set { employeeId = value; }
    }
    
    public string Name
    {
        get { return name; }
        set { name = value; }
    }
    
    public int Age
    {
        get { return age; }
        set { age = value; }
    }
    
    public string Department
    {
        get { return department; }
        set { department = value; }
    }
    
    public string Position
    {
        get { return position; }
        set { position = value; }
    }
    
    public double Salary
    {
        get { return salary; }
        set { salary = value; }
    }
    
    // 显示所有成员信息的方法
    public void DisplayEmployeeInfo()
    {
        Console.WriteLine("员工信息：");
        Console.WriteLine("ID: " + employeeId);
        Console.WriteLine("姓名: " + name);
        Console.WriteLine("年龄: " + age);
        Console.WriteLine("部门: " + department);
        Console.WriteLine("职位: " + position);
        Console.WriteLine("薪资: " + salary.ToString("C")); // 格式化显示为货币格式
    }
}

// 主程序类
class Program
{
    // 主函数
    static void Main(string[] args)
    {
        // 使用带参构造函数创建员工对象
        Employee emp1 = new Employee(1001, "张三", 30, "技术部", "软件工程师", 15000.50);
        
        // 显示员工1的信息
        Console.WriteLine("=== 员工1信息 ===");
        emp1.DisplayEmployeeInfo();
        
        // 使用无参构造函数创建员工对象
        Employee emp2 = new Employee();
        
        // 使用属性设置员工信息
        emp2.EmployeeId = 1002;
        emp2.Name = "李四";
        emp2.Age = 28;
        emp2.Department = "市场部";
        emp2.Position = "产品经理";
        emp2.Salary = 18000.75;
        
        // 显示员工2的信息
        Console.WriteLine("\n=== 员工2信息 ===");
        emp2.DisplayEmployeeInfo();
        
        // 修改员工1的部分信息
        Console.WriteLine("\n=== 修改员工1信息后 ===");
        emp1.Salary = 16500.00;
        emp1.Position = "高级软件工程师";
        emp1.DisplayEmployeeInfo();
        
        // 保持控制台窗口打开
        Console.WriteLine("\n按任意键退出...");
        Console.ReadKey();
    }
}